---
layout: default
title: 标签
permalink: /tag/
icon: tags
type: page
---

<div class="page clearfix">
    <div class="left">
        <div class="searchBoxIndex">
            {% include search.html %}
        </div>
        <h1>{{page.title}}</h1>
        <hr>
        {% capture tags %}
          {% for tag in site.tags %}
            {{ tag[0] }}
          {% endfor %}
        {% endcapture %}
        {% assign sortedtags = tags | split:' ' | sort %}

        <ul>
        {% for tag in sortedtags %}
          <h2 id="{{ tag }}">{{ tag }}</h2>
          {% for post in site.tags[tag] %}
            <li>
                <time>
                {{ post.date | date:"%F" }} {{ post.date | date: "%a" }}.
                </time>
                <a class="title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
            </li>
          {% endfor %}
        {% endfor %}
        </ul>

    </div>
    <div class="anchor"><i class="fa fa-anchor"></i></div>
    <div class="right">
        <div class="wrap">
            <!-- Content -->
            <div class="side content">
                <div class="menuWrapper"></div>
                <div class="title">目录</div>
                <ul id="content-side" class="content-ul">
                    {% for tag in sortedtags %}
                    <li>
                        <a data-scroll href="#{{ tag }}">
                            {{ tag }} ({{ site.tags[tag].size }})
                        </a>
                    </li>
                    {% endfor %}

                </ul>
            </div>
            <!-- 其他div框放到这里 -->
            <!-- <div class="side">bbbb</div> -->
        </div>
    </div>
</div>
<script src="{{ "/js/pageContent.js " | prepend: site.baseurl }}" charset="utf-8"></script>
